import React, { FC } from "react";
import {
  QuestionSliderDefaultProps,
  QuestionSliderPropsType,
} from "./interface";
import { Slider, Space, Typography } from "antd";
const { Paragraph } = Typography;
const Component: FC<QuestionSliderPropsType> = (
  props: QuestionSliderPropsType
) => {
  const { title, noText, yesText, curNum } = {
    ...QuestionSliderDefaultProps,
    ...props,
  };
  return (
    <Space direction="vertical">
      <Paragraph strong>{title}</Paragraph>
      <Space direction="horizontal" size={220}>
        <span>{noText}</span>
        <span>{yesText}</span>
      </Space>
      <Slider value={curNum} />
    </Space>
  );
};

export default Component;
